<template>
  <div :class="$store.state.isPC ? 'containerPC' : 'container'">
    <div
      class="fenmian"
      :style="{
        backgroundImage: 'url(' + bgImg + ')',
      }"
    >
      <div
        class="btn"
        @click="toPage"
      >
        <!-- <div class="loadingCon"></div> -->
      </div>
    </div>
  </div>
</template>

<script>
import fenmianImg from "@/assets/wx/fenmian1.jpg";
import fenmianImg2 from "@/assets/wx/fenmian3.jpg";
import btnImg from "@/assets/wx/btn.jpg";
export default {
  data() {
    return {
      fenmianImg,
      fenmianImg2,
      btnImg,
    };
  },
  computed: {
    bgImg() {
      return this.$store.state.isPC ? fenmianImg2 : fenmianImg;
    },
  },
  mounted() {
    document.title = `Welcome to WeBank's ECC`;
  },
  methods: {
    toPage() {
      window.location.href =
        "https://beyond.3dnest.cn/classic/?m=eea8b26a_TmM0_b6f9&lang=1&LoadLevel=2k";
    },
  },
};
</script>

<style lang="scss" scoped>
@mixin circleAnimate {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  display: block;
  box-sizing: border-box;
  border-radius: 50%;
  background: transparent;
  animation-duration: 1.5s;
  animation-iteration-count: infinite;
  animation-direction: normal;
  animation-timing-function: ease;
}
.container {
  text-align: center;
  height: 100vh;
  background-color: #13102b;
  margin: 0 auto;
  .fenmian {
    height: 1920px;
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;

    .btn {
      position: absolute;
      left: 290px;
      top: 1340px;
      width: 500px;
      height: 66px;
      .loadingCon {
        position: absolute;
        width: 100px;
        height: 100px;
        left: 200px;
        top: -20px;
        &::before {
          @include circleAnimate;
          width: 88px;
          height: 88px;
          border: 22px solid hsla(0, 0%, 100%, 0.4);
          z-index: 10;
          animation-name: tgtipsbefore;
        }
        &::after {
          @include circleAnimate;
          width: 52px;
          height: 52px;
          border: 12px solid hsla(0, 0%, 100%, 0.7);
          animation-name: tgtipsafter;
        }
      }
    }
  }
}
.containerPC {
  text-align: center;
  // width: 375px;
  background-color: #14113c;
  margin: 0 auto;
  .fenmian {
    height: 608px;
    background-position: center 0;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;

    .btn {
      position: absolute;
      left: 62px;
      top: 426px;
      width: 282px;
      height: 38px;
      background-position: center 0;
      background-size: cover;
      background-repeat: no-repeat;
      .loadingCon {
        position: absolute;
        width: 50px;
        height: 50px;
        left: 62px;
        top: -12px;
        &::before {
          width: 26px;
          height: 26px;
          border: 6px solid hsla(0, 0%, 100%, 0.4);
          z-index: 10;
          animation-name: tgtipsbefore;
          @include circleAnimate;
        }
        &::after {
          @include circleAnimate;
          width: 32px;
          height: 32px;
          border: 8px solid hsla(0, 0%, 100%, 0.7);
          animation-name: tgtipsafter;
        }
      }
    }
  }
}
@keyframes tgtipsbefore {
  20% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  60% {
    -webkit-transform: scale(1.13);
    transform: scale(1.13);
  }
  to {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}
@keyframes tgtipsafter {
  0% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    -webkit-transform: scale(1.2);
    transform: scale(1.2);
  }
  to {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes regScale {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}
</style>